namespace ZR.Model.Models.ProductionControl
{
    /// <summary>
    /// PLC配置表
    /// </summary>
    [SugarTable("plc_config")]
    [Table(Name = "plc_config")]
    public class PlcConfig : BaseEntity
    {
        /// <summary>
        /// Id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        [Column(IsPrimary =true,IsIdentity =true)]
        public int Id { get; set; }

        /// <summary>
        /// 产线代号
        /// </summary>
        [SugarColumn(ColumnName = "production_line_code")]
        [Column(Name = "production_line_code")]
        public string ProductionLineCode { get; set; }

        /// <summary>
        /// 工位代号
        /// </summary>
        [SugarColumn(ColumnName = "workstation_code")]
        [Column(Name = "workstation_code")]
        public string WorkstationCode { get; set; }

        /// <summary>
        /// PLC类型
        /// </summary>
        [SugarColumn(ColumnName = "plc_type")]
        [Column(Name = "plc_type")]
        public string PlcType { get; set; }

        /// <summary>
        /// PLC地址
        /// </summary>
        [SugarColumn(ColumnName = "plc_address")]
        [Column(Name = "plc_address")]
        public string PlcAddress { get; set; }

        /// <summary>
        /// CPU类型
        /// </summary>
        [SugarColumn(ColumnName = "cpu_type")]
        [Column(Name = "cpu_type")]
        public string CpuType { get; set; }

        /// <summary>
        /// 插槽号
        /// </summary>
        [SugarColumn(ColumnName = "slot_number")]
        [Column(Name = "slot_number")]
        public int? SlotNumber { get; set; }

        /// <summary>
        /// 机架号
        /// </summary>
        [SugarColumn(ColumnName = "rack_number")]
        [Column(Name = "rack_number")]
        public int? RackNumber { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "creation_time")]
        [Column(Name = "creation_time")]
        public DateTime? CreationTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "creator_name")]
        [Column(Name = "creator_name")]
        public string CreatorName { get; set; }
        /// <summary>
        /// 上位机是否启用
        /// </summary>
        [SugarColumn(ColumnName = "is_enabled")]
        [Column(Name = "is_enabled")]
        public bool IsEnabled { get; set; }
    }
}